/*
 * @Author: Bo
 * @Date: 2022-03-16 08:48:57
 */
import { createApp } from 'vue'
import App from './App.vue'
import router from './router/router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as api from './api/api'
import { createPinia } from 'pinia'
import Particles from 'particles.vue3'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import './assets/less/index.less'

// 初始化
function bootstrap() {
  const app = createApp(App)

  // 设置全局请求api
  app.config.globalProperties.$api = api
  //路由配置
  app.use(router)
  //element plus
  app.use(ElementPlus)
  // pinia
  app.use(createPinia())
  // Particles
  app.use(Particles)
  // element-icon
  for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
  // app.use(Particles)
  app.mount('#app')
}

bootstrap()
